<template>
  <div class="ma-content-block lg:flex justify-between p-4">
    <!-- CRUD 组件 -->
    <ma-crud :options="options" :columns="columns" ref="crudRef">
    </ma-crud>
  </div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import goodsCarBrands from '@/api/goods/goodsCarBrands'
import { Message } from '@arco-design/web-vue'
import tool from '@/utils/tool'
import * as common from '@/utils/common'

const crudRef = ref()




const options = reactive({
  id: 'tinkle_goods_car_brands',
  rowSelection: {
    showCheckedAll: true
  },
  pk: 'id',
  operationColumn: false,
  operationColumnWidth: 160,
  formOption: {
    viewType: 'modal',
    width: 600
  },
  api: goodsCarBrands.getList
})

const columns = reactive([
  {
    title: "",
    dataIndex: "id",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    commonRules: {
      required: true,
      message: "请输入"
    }
  },
  {
    title: "品牌名称",
    dataIndex: "brandName",
    formType: "input",
    search: true,
    commonRules: {
      required: true,
      message: "请输入品牌名称"
    }
  },
  {
    title: "品牌首字母",
    dataIndex: "firstLetter",
    formType: "input",
    search: true,
    commonRules: {
      required: true,
      message: "请输入品牌首字母"
    }
  },
  {
    title: "品牌logo",
    dataIndex: "imageSrc",
    formType: "upload",
    type: "image",
    multiple: true
  },
  {
    title: "类型",
    dataIndex: "eVehicleSystem",
    formType: "input",
    // search: true
  },
  {
    title: "排量",
    dataIndex: "exhaustVolume",
    formType: "input",
    // search: true
  },
  {
    title: "标识ID",
    dataIndex: "gcId",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    commonRules: {
      required: true,
      message: "请输入标识ID"
    }
  },
  {
    title: "车型",
    dataIndex: "transmissionDesc",
    formType: "input",
    // search: true
  },
  // {
  //   title: "",
  //   dataIndex: "transmissionEn",
  //   formType: "input",
  //   // search: true
  // },
  // {
  //   title: "",
  //   dataIndex: "vehicleSystem",
  //   formType: "input",
  //   // search: true
  // },
  {
    title: "年份",
    dataIndex: "year",
    formType: "input",
    // search: true
  },
  {
    title: "全称",
    dataIndex: "car_models_name",
    formType: "input",
    // search: true
  },
  {
    title: "",
    dataIndex: "manufacturerName",
    formType: "input",
    // search: true
  }
])
</script>
<script> export default { name: 'goods:carBrands' } </script>